package com.atcjx.mapper;

import com.atcjx.pojo.User.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author admin
 * @version 1.0.0
 * @ClassName UserMapper.java
 * @Description TODO
 * @createTime 2021年09月19日 15:28:00
 */
@Mapper
@Repository
public interface UserMapper {
    @Select("select * from user")
    List<User> getUsers();

    @Select("select * from user where id=${id}")
    User getUserById(@Param("id")int id);

    int createUser(User user);

    int updateUser(User user);

    User getUserByAccount(String account);


}
